/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * 
 * @author wyr
 */
@Entity
@Table(name = "news_contenresource")
//@NamedQueries( {
//		@NamedQuery(name = "NewsContentResource.findAll", query = "SELECT n FROM NewsContentResource n"),
//		@NamedQuery(name = "NewsContentResource.findByCid", query = "SELECT n FROM NewsContentResource n WHERE n.cid = :cid"),
//		@NamedQuery(name = "NewsContentResource.findByContentId", query = "SELECT n FROM NewsContentResource n WHERE n.rid = :rid") })
public class NewsContentResource implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	@Column(name = "cid")
	private Integer cid;
	@Column(name = "rid")
	private Integer rid;

	public NewsContentResource() {
	}

	public NewsContentResource(Integer cid) {
		this.cid = cid;
	}

	public Integer getCid() {
		return cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (cid != null ? cid.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are
		// not set
		if (!(object instanceof NewsContentResource)) {
			return false;
		}
		NewsContentResource other = (NewsContentResource) object;
		if ((this.cid == null && other.cid != null)
				|| (this.cid != null && !this.cid.equals(other.cid))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "com.dp.vo.NewsContenttitle[cid=" + cid + "]";
	}

	public Integer getRid() {
		return rid;
	}

	public void setRid(Integer rid) {
		this.rid = rid;
	}

}
